from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
from django.conf import settings
from project import views
from django.contrib.auth.views import login, logout



urlpatterns = patterns('',

    url(r'^$', 'project.views.index'),
    url(r'^principal/$','project.views.index2',name="index"),
    (r'^swea/$', 'project.views.index'),

    #ConsultarEstadoPeticion
    url(r'^estado/$','project.views.estado', name="estado"),
    #ValidarPeticiones
    url(r'^validar/$', 'project.views.validar', name="validar"),
    #CrearPeticiones
    url(r'^peticion/$', 'project.views.peticion_facultades', name='PetPaso1'),
    url(r'^peticion/peticion_paso_2/(?P<facul>[^/]+)$', 'project.views.peticion_plantas', name='PetPaso2'),
    url(r'^peticion/peticion_paso_3/(?P<plan>[^/]+)$', 'project.views.peticion_aulas', name='PetPaso3'),
    url(r'^peticion/realizar_peticion/$', 'project.views.peticion_final', name="PetPaso4"),
   
    #VolverPrinciLIMPIANDO
    (r'^[^/]+/djangoWeb/[^/]+/','project.views.index2'),
    (r'^accounts/profile/$', 'project.views.index2'),
    (r'^accounts/$', 'project.views.index2'),
    
    #Enable el Loguin:
    (r'^accounts/login/$', login), 
    url(r'^accounts/logout/$','django.contrib.auth.views.logout', name="logout"),
    
    # To enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    #Enable the `admin`:
    (r'^admin/', include(admin.site.urls)),    
    #Enable the `media`:
    url(r'^%s/(?P<path>.*)$' % settings.MEDIA_URL[1:-1], 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT}),

   )
